const db = require('../utils/db')
class UserModel{
	constructor(){
		this.userModel = db.model('users',{
			username:String,
			password:String
		})
	}
	save(data){
		var user = new this.userModel(data);
		return user.save();
	}
	find(data){
		return this.userModel.find(data);
	}
}
module.exports = new UserModel();